home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / game / patch / WHDIGamesS-T.lzh / SuperScrambleSimulator.lha / SuperScrambleSimulatorHD / Install next >
Text File  |  2000-11-24  |  3KB  |  164 lines

  1. (set #sub-dir "data")        ;sub directory containing data files
  2. (set #readme-file "SuperScramble.readme")    ;name of readme file
  3.  
  4. ;****************************
  5.  
  6. ;----------------------------
  7. ; Checks if given program is reachable via the path
  8. ; if not abort install
  9. ; IN:  #program - to check
  10. ; OUT: -
  11.  
  12. (procedure P_chkrun
  13.   (if
  14.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  15.     ("")
  16.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  17.   )
  18. )
  19.  
  20. ;----------------------------
  21. ; Wait for inserting disk
  22. ; IN:  #AD_disk - name of disk
  23. ; OUT: -
  24.  
  25. (procedure P_disk
  26.   (askdisk
  27.     (dest #AD_disk)
  28.     (prompt ("\nInsert Disk \"%s\" in any drive !" #AD_disk))
  29.     (help @askdisk-help)
  30.   )
  31. )
  32.  
  33.  
  34. ;****************************
  35.  
  36. (if
  37.   (exists #readme-file)
  38.   (if 
  39.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  40.     ("")
  41.     (run ("SYS:Utilities/More %s" #readme-file))
  42.   )
  43. )
  44.  
  45. (set #program "WHDLoad")
  46. (P_chkrun)
  47.  
  48. (set @default-dest
  49.   (askdir
  50.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  51.     (help @askdir-help)
  52.     (default @default-dest)
  53.     (disk)
  54.   )
  55. )
  56. (set #dest (tackon @default-dest @app-name))
  57. (if
  58.   (exists #dest)
  59.   (
  60.     (set #choice
  61.       (askbool
  62.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  63.         (default 1)
  64.         (choices "Delete" "Skip")
  65.         (help @askbool-help)
  66.       )
  67.     )
  68.     (if
  69.       (= #choice 1)
  70.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  71.     )
  72.   )
  73. )
  74. (makedir #dest
  75.   (help @makedir-help)
  76.   (infos)
  77. )
  78.  
  79. ;----------------------------
  80.  
  81. (copyfiles
  82.   (help @copyfiles-help)
  83.   (source ("%s.slave" @app-name))
  84.   (dest #dest)
  85. )
  86. (if
  87.   (exists ("%s.newicon" @app-name))
  88.   (set #icon
  89.     (askchoice
  90.       (prompt "\nWhich icon do you like to install ?\n")
  91.       (default 0)
  92.       (choices "Normal" "NewIcon")
  93.       (help @askchoice-help)
  94.     )
  95.   )
  96.   (set #icon 0)
  97. )
  98. (select #icon
  99.   (set #icon ("%s.inf" @app-name))
  100.   (set #icon ("%s.newicon" @app-name))
  101. )
  102. (copyfiles
  103.   (help @copyfiles-help)
  104.   (source #icon)
  105.   (newname ("%s.info" @app-name))
  106.   (dest #dest)
  107. )
  108. (if
  109.   (exists #readme-file)
  110.   (copyfiles
  111.     (help @copyfiles-help)
  112.     (source #readme-file)
  113.     (dest #dest)
  114.   )
  115. )
  116. (if
  117.   (exists ("%s.info" #readme-file))
  118.   (copyfiles
  119.     (help @copyfiles-help)
  120.     (source ("%s.info" #readme-file))
  121.     (dest #dest)
  122.   )
  123. )
  124. (if
  125.   (= #sub-dir "")
  126.   ("")
  127.   (
  128.     (set #dest (tackon #dest #sub-dir))
  129.     (makedir #dest
  130.       (help @makedir-help)
  131.     )
  132.   )
  133. )
  134.  
  135. (copyfiles
  136.   (help @copyfiles-help)
  137.   (source ("OSEmu.400"))
  138.   (dest #dest)
  139. )
  140.  
  141. ;----------------------------
  142.  
  143. (set #AD_disk "BIKE1")
  144. (message "Insert Disk #1")
  145.  
  146. (copyfiles
  147.   (help @copyfiles-help)
  148.   (source ("%s:" #AD_disk))
  149.   (dest #dest)
  150.   (all)
  151. )
  152.  
  153. (set #AD_disk "BIKE2")
  154. (message "Insert Disk #2")
  155.  
  156. (copyfiles
  157.   (help @copyfiles-help)
  158.   (source ("%s:" #AD_disk))
  159.   (dest #dest)
  160.   (all)
  161. )
  162.  
  163. (exit)
  164.